/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package controller;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;
import model.dao.ConnectionFactory;
import model.dao.service.ShiftDAOService;
import model.entities.Shift;
import model.dao.ShiftDAO;

/**
 *
 * @author Luffy
 */
public class ShiftController implements ShiftDAOService {

    @Override
    public List<Shift> getShiftsList() {
        return ShiftDAO.getInstance().getShiftsList();
    }

    @Override
    public Shift getShiftByID(int shiftID) {
        return ShiftDAO.getInstance().getShiftByID(shiftID);
    }

    @Override
    public boolean insertShift(Shift Shift) {
        return ShiftDAO.getInstance().insertShift(Shift);
    }

    @Override
    public boolean updateShift(Shift Shift) {
        return ShiftDAO.getInstance().updateShift(Shift);
    }

    @Override
    public boolean deleteShift(int shiftId) {
        return ShiftDAO.getInstance().deleteShift(shiftId);
    }

    @Override
    public List<Shift> findShiftByID(int shiftId) {
        return ShiftDAO.getInstance().findShiftByID(shiftId);
    }

    @Override
    public List<Shift> findShiftByName(String shiftName) {
        return ShiftDAO.getInstance().findShiftByName(shiftName);
    }
    
}
